package com.anze.abd.service.product;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.anze.abd.persistence.dao.ProductDao;
import com.anze.abd.persistence.domain.Product;
import com.anze.base.service.commons.BaseService;

/**
 * 产品管理
 * @author hejun
 *
 */
@Service("productService")
public class ProductService extends BaseService{
	
	@Resource(name = "productDao")
	private ProductDao productDao;
	
	/**
	 * 描述：保存新增
	 */
	public void save(Product product) {
		productDao.save(product);
	}

	/**
	 * 描述：保存更新
	 * @param product
	 */
	public void update(Product product) {
		productDao.update(product);
	}

	/**
	 * 描述：删除
	 * @param id
	 */
	public void delete(Long id) {
		Product product = productDao.get(id);
		productDao.delete(product);
	}

	/**
	 * 描述：获取
	 * @param id
	 */
	public Product get(Long id) {
		return productDao.get(id);
	}
}
